package com.teng.stringtest1;

import java.util.Scanner;

public class TestString {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
//        for (int i = 0; i < s.length(); i++) {
//            System.out.println(s.charAt(i));
//        }
        char[] c = s.toLowerCase().toCharArray();
        int letterCount = 0;
        int numCount = 0;
        for (int i = 0; i < c.length; i++) {
            if (c[i] >= 'a' & c[i] <= 'z') {
                letterCount++;
            } else if (c[i] >= '0' & c[i] <= '9') {
                numCount++;
            }
        }

        System.out.println(letterCount);
        System.out.println(numCount);
    }
}
